package com.settlement.system.model.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 抖音原始账单导入对象
 * </p>
 *
 * @author huangrensen
 * @since 2023-08-05
 */
@Data
public class YzBillImportVo {

    /**
     * 类型
     */
    @ExcelProperty(value = "类型")
    private String billType;

    /**
     * 名称
     */
    @ExcelProperty(value = "名称")
    private String productName;

    /**
     * 业务单号
     */
    @ExcelProperty(value = "业务单号")
    private String businessNo;

    /**
     * 支付流水号
     */
    @ExcelProperty(value = "支付流水号")
    private String payNo;

    /**
     * 关联单号
     */
    @ExcelProperty(value = "关联单号")
    private String linkNumber;

    /**
     * 交易来源地
     */
    @ExcelProperty(value = "交易来源地")
    private String sourcePlace;

    /**
     * 财务主体
     */
    @ExcelProperty(value = "财务主体")
    private String billCompany;

    /**
     * 账户
     */
    @ExcelProperty(value = "账户")
    private String account;

    /**
     * 收入(元)
     */
    @ExcelProperty(value = "收入(元)")
    private BigDecimal incomeAmount;

    /**
     * 支出(元)
     */
    @ExcelProperty(value = "支出(元)")
    private BigDecimal payAmount;

    /**
     * 余额(元)
     */
    @ExcelProperty(value = "余额(元)")
    private BigDecimal restAmount;

    /**
     * 支付方式
     */
    @ExcelProperty(value = "支付方式")
    private String payType;

    /**
     * 交易对手
     */
    @ExcelProperty(value = "交易对手")
    private String tradeObj;

    /**
     * 渠道
     */
    @ExcelProperty(value = "渠道")
    private String channel;

    /**
     * 下单时间
     */
    @ExcelProperty(value = "下单时间")
    private String orderTime;

    /**
     * 入账时间
     */
    @ExcelProperty(value = "入账时间")
    private String incomeTime;

    /**
     * 操作人
     */
    @ExcelProperty(value = "操作人")
    private String op;

    /**
     * 附加信息
     */
    @ExcelProperty(value = "附加信息")
    private String attach;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 来源
     */
    @ExcelProperty(value = "来源")
    private String sourceText;

    public static Map<String, String> getKeyMap(){
        Map<String, String> map = new HashMap<>();
        map.put("类型", "billType");
        map.put("名称", "productName");
        map.put("业务单号", "businessNo");
        map.put("支付流水号", "payNo");
        map.put("关联单号", "linkNumber");
        map.put("交易来源地", "sourcePlace");
        map.put("账务主体", "billCompany");
        map.put("账户", "account");
        map.put("收入(元)", "incomeAmount");
        map.put("支出(元)", "payAmount");
        map.put("余额(元)", "restAmount");
        map.put("支付方式", "payType");
        map.put("交易对手", "tradeObj");
        map.put("渠道", "channel");
        map.put("下单时间", "orderTime");
        map.put("入账时间", "incomeTime");
        map.put("操作人", "op");
        map.put("附加信息", "attach");
        map.put("备注", "remark");
        map.put("来源", "sourceText");
        map.put("账单月份", "billMonth");
        return  map;
    }
}
